<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@include file="../../../base.jsp" %>
<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2018/3/3 0003
  Time: 01:17
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<div class="cover" id="editGrowthPage">
    <div class="modal-dialog floatage">
        <div class="modal-content" id="floadtageCentent">
            <div class="text-center">
                <div class="modal-header">
                    <button type="button" class="close" onclick="editGrowth.closeWindow()">x</button>
                    <h1 class="text-center text-primary">
                        <c:choose>
                            <c:when test="${empty growthId}">
                                添加维度
                            </c:when>
                            <c:otherwise>
                                修改维度
                            </c:otherwise>
                        </c:choose>

                    </h1>
                </div>
                <br>
                <form class="form-horizontal" id="growthForm">
                    <input hidden name="growth.growthId" value="${growthId}"/>
                    <div class="form-group">
                        <label for="name" class="col-sm-2 control-label">名称</label>
                        <div class="col-sm-8">
                            <input name="growth.name" value="${growth.name}" type="text" class="form-control" id="name"
                                   placeholder="名称">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="name" class="col-sm-2 control-label">描述</label>
                        <div class="col-sm-8">
                            <textarea  class="form-control" rows="3" name="growth.descr"
                                      placeholder="描述">${growth.descr}</textarea>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="status" class="col-sm-2 control-label">状态</label>
                        <div class="col-sm-8">
                            <select class="form-control" name="growth.status" id="status">
                                <option value="0" <c:if test="${growth.status == 0}"> selected</c:if> >默认（未发布）</option>
                                <option value="50" <c:if test="${growth.status == 50}"> selected</c:if> >发布</option>
                                <option value="99" <c:if test="${growth.status == 99}"> selected</c:if> >废除</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="rank" class="col-sm-2 control-label">顺序</label>
                        <div class="col-sm-8">
                            <input name="growth.rank" value="${growth.rank}" type="number" class="form-control"
                                   id="rank" placeholder="排序号">
                        </div>
                    </div>
                    <%--<div class="form-group">--%>
                    <%--<p class="text-danger text-center">当前数据库中的最大排序号是 3 </p>--%>
                    <%--</div>--%>
                    <div class="form-group">
                        <div class="">
                            <button type="button" class="btn btn-danger" onclick="editGrowth.submitForm(${growth.growthId});">提交</button>
                            <button type="button" class="btn btn-default" onclick="editGrowth.closeWindow();">取消
                            </button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
</div>
<script src="${basePath}js/growth_js/editGrowth.js"></script>